1. Field of the Invention
The present invention relates to a communication apparatus, and a method for controlling a communication apparatus.
2. Description of the Related Art
There are services that let a user upload image data captured by a camera via a public network so as to allow people to view the image (see Japanese Patent Laid-Open No. 2007-251748). Meanwhile, there is a technique as disclosed in Japanese Patent Laid-Open No. 2000-138703 in which content data to be transmitted to an open network is encrypted whereas content data to be transmitted to a network that restricts user access is not encrypted.
Also, there is a communication parameter setting technique for allowing a plurality of communication apparatuses to easily share a communication parameter used to configure an IEEE 802.11 wireless LAN network (hereinafter referred to as a wireless LAN). The communication parameter includes an SSID that is network identification information, a frequency channel, an encryption key, an encryption scheme, an authentication scheme, and so on. The communication parameter setting technique has already been standardized (Wi-Fi CERTIFIED™ for Wi-Fi Protected Setup Easing the User Experience for Home and Small Office Wi-Fi (R) Networks, http://www.wi-fi.org/files/kc/20090123_Wi-Fi_Protected Setup.pdf, hereinafter referred to as WPS), and has been applied to many communication apparatuses.
With the WPS communication parameter setting process, a communication parameter is provided from one communication apparatus to another communication apparatus by using a specific protocol. When transmitting or receiving a communication parameter, a first encryption key that is shared between the communication apparatuses by the Diffie-Hellman key exchange algorithm is used. The first encryption key is discarded when the communication parameter has been set or when the expiration time is reached.
When carrying out wireless communication via a wireless network configured with the shared communication parameter, a second encryption key based on the communication parameter is used. The second encryption key is discarded when the wireless network is disconnected after desired communication ends, or when the expiration time is reached.